package com.ch.home.bean;

import java.util.ArrayList;

/**
 * 典故
 * Created by CHEN on 2019/8/24.
 */
public class DishLiterary {
    private Integer literaryId;
    private Integer dishId;
    private String literaryTitle;//典故标题
    private String literaryContent;//典故内容

    private ArrayList<String> url;
    private ArrayList<String> previewUrl;

    public DishLiterary() {
    }

    public DishLiterary(Integer literaryId, Integer dishId, String literaryTitle, String literaryContent, ArrayList<String> url, ArrayList<String> previewUrl) {
        this.literaryId = literaryId;
        this.dishId = dishId;
        this.literaryTitle = literaryTitle;
        this.literaryContent = literaryContent;
        this.url = url;
        this.previewUrl = previewUrl;
    }

    public Integer getLiteraryId() {

        return literaryId;
    }

    public void setLiteraryId(Integer literaryId) {
        this.literaryId = literaryId;
    }

    public Integer getDishId() {
        return dishId;
    }

    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }

    public String getLiteraryTitle() {
        return literaryTitle;
    }

    public void setLiteraryTitle(String literaryTitle) {
        this.literaryTitle = literaryTitle;
    }

    public String getLiteraryContent() {
        return literaryContent;
    }

    public void setLiteraryContent(String literaryContent) {
        this.literaryContent = literaryContent;
    }

    public ArrayList<String> getUrl() {
        return url;
    }

    public void setUrl(ArrayList<String> url) {
        this.url = url;
    }

    public ArrayList<String> getPreviewUrl() {
        return previewUrl;
    }

    public void setPreviewUrl(ArrayList<String> previewUrl) {
        this.previewUrl = previewUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass( ) != o.getClass( )) return false;

        DishLiterary that = (DishLiterary) o;

        if (literaryId != null ? !literaryId.equals(that.literaryId) : that.literaryId != null) return false;
        if (dishId != null ? !dishId.equals(that.dishId) : that.dishId != null) return false;
        if (literaryTitle != null ? !literaryTitle.equals(that.literaryTitle) : that.literaryTitle != null)
            return false;
        if (literaryContent != null ? !literaryContent.equals(that.literaryContent) : that.literaryContent != null)
            return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;
        return previewUrl != null ? previewUrl.equals(that.previewUrl) : that.previewUrl == null;
    }

    @Override
    public int hashCode() {
        int result = literaryId != null ? literaryId.hashCode( ) : 0;
        result = 31 * result + (dishId != null ? dishId.hashCode( ) : 0);
        result = 31 * result + (literaryTitle != null ? literaryTitle.hashCode( ) : 0);
        result = 31 * result + (literaryContent != null ? literaryContent.hashCode( ) : 0);
        result = 31 * result + (url != null ? url.hashCode( ) : 0);
        result = 31 * result + (previewUrl != null ? previewUrl.hashCode( ) : 0);
        return result;
    }

    @Override
    public String toString() {
        return "DishLiterary{" +
                "literaryId=" + literaryId +
                ", dishId=" + dishId +
                ", literaryTitle='" + literaryTitle + '\'' +
                ", literaryContent='" + literaryContent + '\'' +
                ", url=" + url +
                ", previewUrl=" + previewUrl +
                '}';
    }
}
